﻿<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MyBookings.aspx.cs" Inherits="HotellApplikationASP.About" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <div class="row">
        <div class="col-md-8">
            <asp:Button ID="ButtonPaging" CssClass="btn btn-default btn-xs mt30" OnClick="ButtonPaging_Click" runat="server" Text="Paging" />
            <asp:GridView ID="GridView2" runat="server" CssClass="table table-striped table-condensed"
                ItemType="HotellApplikationASP.Order"
                DataKeyNames="Id"
                AllowSorting="True"
                SelectMethod="GridView2_GetData"
                AutoGenerateColumns="False" OnSelectedIndexChanged="GridView2_SelectedIndexChanged1">
                <Columns>
                    <asp:CommandField SelectText="View Details" ShowSelectButton="true" />
                    <%--                            <asp:ButtonField ButtonType="Link" Text="Select" CommandName="Select" />--%>
                    <asp:BoundField DataField="Id" HeaderText="ID" SortExpression="Id" ReadOnly="True" />
                    <asp:BoundField DataField="OrderDate" HeaderText="Order Date" SortExpression="OrderDate" ReadOnly="True" />
                    <asp:CheckBoxField HeaderText="Paid" DataField="IsPayed" ReadOnly="True" />


                </Columns>
                <SelectedRowStyle BackColor="LightCyan"
                    ForeColor="DarkBlue"
                    Font-Bold="true" />
            </asp:GridView>

        </div>
        <div class="col-md-4 mt40">
            <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                <ItemTemplate>
                    <h3>Room no. <asp:Literal ID="litRoomID" runat="server"></asp:Literal></h3><br/>

                    <span>Ankomstdatum: </span><asp:Literal ID="litStartDate" runat="server"></asp:Literal><br/>
                    <span>Avgångsdatum: </span><asp:Literal ID="litEndDate" runat="server"></asp:Literal><br/>
                    <span>Totalt: </span><asp:Literal ID="litTotal" runat="server"></asp:Literal><br/>
                </ItemTemplate>

            </asp:Repeater>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-12">
            <span>Du kan annulera din bokning fram tills 10 dagar innan första ankomstdatum i din bokning</span>
        </div>
        
    </div>
    <div class="row">
        <div class="col-md-12 mt30">
            <asp:Button ID="btnAnnulate" CssClass="btn btn-danger" runat="server" Text="Annulera" Enabled="False" OnClick="btnAnnulate_Click" />
        </div>
    </div>

</asp:Content>
